x86/mm: rewrite virt_to_xen_l*e
authorWei Liu <wei.liu2@citrix.com>
Thu, 22 Apr 2021 12:12:31 +0000 (14:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Apr 2021 12:12:31 +0000 (14:12 +0200)
commit4215992594b66e3f37ea776e71808987589c102a
tree2d2c81077c1f3a4cb5da5596aec5a6e484a177e1
parent1be65ec4c8bc172aadd6bc1b6553c668152899ae
x86/mm: rewrite virt_to_xen_l*e

Rewrite those functions to use the new APIs. Modify its callers to unmap
the pointer returned. Since alloc_xen_pagetable_new() is almost never
useful unless accompanied by page clearing and a mapping, introduce a
helper alloc_map_clear_xen_pt() for this sequence.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Hongyan Xia <hongyxia@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c
xen/include/asm-x86/mm.h